Reduce spin-waiting in Xen serial driver:
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Thu, 23 Mar 2006 16:17:08 +0000 (17:17 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Thu, 23 Mar 2006 16:17:08 +0000 (17:17 +0100)
commita220cd9bebd1249df1708716995a4e95e142392a
treefcff46d9e8c810f7ae8b0938c6bbc218aec64e10
parent3b214d9b38158d1cd18790b67b5a27fd57cb9955
Reduce spin-waiting in Xen serial driver:
 1. Split the serial port lock into receiver and transmitter locks.
 2. In the ns16550 interrupt, only call the generic serial service
    routines if there is receive (or transmit) work to do.
 3. In the generic transmit ISR, avoid long spin-waits by *trying*
    to take the transmitter lock and, if that fails, check again
    whether the transmitter is empty. This will allow us to bail
    bail quickly if there is a long-term lock holder stuffing lots
    of bytes.

Also, gdbstub should be setting its serial handle in synchronous mode,
just for sanity.

Signed-off-by: Keir Fraser <keir@xensource.com>
xen/common/gdbstub.c
xen/drivers/char/ns16550.c
xen/drivers/char/serial.c
xen/include/xen/serial.h